package com.bookyourtrek.action;

import java.math.BigInteger;
import java.util.ArrayList;

import com.bookyourtrek.model.OrderModel;
import com.bookyourtrek.model.OrderSummaryPojo;
import com.bookyourtrek.model.TicketModel;
import com.bookyourtrek.model.TicketPojo;
import com.bookyourtrek.model.TrekModel;
import com.bookyourtrek.model.TrekPojo;
import com.bookyourtrek.util.RuntimeSettings;
import com.opensymphony.xwork2.ActionSupport;

public class OrderDetailsAction extends ActionSupport{

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private BigInteger orderid;
	private ArrayList<OrderSummaryPojo> osp = new ArrayList<OrderSummaryPojo>();
	private ArrayList<TrekPojo> trekp = new ArrayList<TrekPojo>();
	private ArrayList<TicketPojo> ticketp = new ArrayList<TicketPojo>();
	
	public ArrayList<OrderSummaryPojo> getOsp() {
		return osp;
	}
	public void setOsp(ArrayList<OrderSummaryPojo> osp) {
		this.osp = osp;
	}

	public ArrayList<TrekPojo> getTrekp() {
		return trekp;
	}

	public void setTrekp(ArrayList<TrekPojo> trekp) {
		this.trekp = trekp;
	}

	public ArrayList<TicketPojo> getTicketp() {
		return ticketp;
	}

	public void setTicketp(ArrayList<TicketPojo> ticketp) {
		this.ticketp = ticketp;
	}

	public BigInteger getOrderid() {
		return orderid;
	}

	public void setOrderid(BigInteger orderid) {
		this.orderid = orderid;
	}

	public String orderdetails() {
		
		if(orderid == null) {
			return INPUT;
		}
		
		// get order details
		OrderModel om = new OrderModel();
		osp = om.getOrderSummaryByID(orderid);
		
		//get ticket details
		//TicketModel ticketm = new TicketModel();
		//ticketp = ticketm.getticket(osp.get(0).getTicketid(), RuntimeSettings.EVENTTREKKING.toString());
		
		//get trek details
		//TrekModel trekm = new TrekModel();
		//trekp = trekm.gettrekdetails(ticketp.get(0).getEventid());
		
		
		return SUCCESS;
	}

}
